﻿using Basic.FormGatewaryModular.Interface;
using Basic.FormRemoteModel;
using Basic.FormRemoteModel.QueryControl.Model;
using WeDonekRpc.Helper.Validate;
using WeDonekRpc.HttpApiGateway;

namespace Basic.FormGatewaryModular.Api
{
    internal class QueryControlApi : ApiController
    {
        private readonly IQueryControlService _Service;

        public QueryControlApi ( IQueryControlService service )
        {
            this._Service = service;
        }

        public QueryControlDto[] Gets ( [EnumValidate("form.location.error", typeof(LayoutLocation))] LayoutLocation location )
        {
            return this._Service.Gets(location);
        }
    }
}
